Skip to content

fix(backups): watchdog asserts dashboard offsite presence on R2 (#3914) - #5220

Merged
dezren39 merged 1 commit into
mainfrom
queue/8948-3914-watchdog-offsite
Nov 4, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/8948-3914-watchdog-offsite

Conversation

@dezren39

@dezren39 dezren39 commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

What

Remainder of #3914 (from triage task 7421), worked as task 8948:

  1. Backfill (operational, already done — not in this diff): R2 supabase-backups/dashboard/ was missing 2026-10-29..2026-11-01. All four date dirs were copied from the laptop local archives with the job's own rclone env-remote route (rclone copyto to the same destination shape pm-dashboard-backup.sh uses) and verified by a fresh listing: R2 now holds 2026-10-27..2026-11-03, every object's size matching its local archive exactly (2026-10-29: 156352 B, 2026-10-30: 144040 B, 2026-10-31: 161681 B, 2026-11-01: 174899 B).

  2. Watchdog offsite-presence assertion (this diff): laptop-backups-watchdog.sh gains an opt-in section (c): when LAPTOP_BACKUPS_OFFSITE_CHECK=1, it reads the run record's date, lists r2bak:supabase-backups/dashboard/<date>/ (Bitwarden credentials exactly as pm-dashboard-backup.sh fetches them; rclone/bws via PATH), and fails naming the R2 absence when dashboard-<date>.tar.zst is not there — even when the run record says complete, which is exactly the pm-dashboard-backup: offsite legs landed nothing since 2026-10-28; runs failing at db-dump; watchdog cannot see offsite absence #3914 failure shape the record-only check could not see. laptop-backups.nix sets the opt-in for the watchdog service (its PATH already carries rclone via servicePath and bws via ~/tools/bin).

Tests

  • bash nixos/home/laptop-backups-watchdog.test.sh — all scenarios pass, including three new ones with stubbed bws/rclone: offsite-present exits 0, planted offsite-absence exits non-zero naming R2, and with the check disabled the same absence keeps the old behavior.
  • Live run of the new watchdog on the laptop with the check enabled (real rclone + Bitwarden + R2): OK jobs [dashboard] fresh within 26h — record date 2026-11-03 verified present on R2.

Note: the watchdog change takes effect on the laptop when the home configuration is next applied (nixos/home is deployed from this repo); the backfill is already live.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

… task 8948)

- laptop-backups-watchdog.sh: opt-in section (c) via LAPTOP_BACKUPS_OFFSITE_CHECK - lists r2bak:supabase-backups/dashboard/<record date>/ and fails naming the R2 absence when dashboard-<date>.tar.zst is missing, even when the run record says complete (the 2026-10-29..2026-11-01 failure shape). Credentials via Bitwarden exactly as pm-dashboard-backup.sh; rclone/bws via PATH.

- laptop-backups.nix: watchdog service sets LAPTOP_BACKUPS_OFFSITE_CHECK=1 (servicePath already carries rclone, ~/tools/bin carries bws).

- tests: stub bws/rclone; offsite-present passes, planted offsite-absent fails naming R2, disabled check keeps old behavior. Full suite passes; live run against real R2 also passes (record date 2026-11-03 present).
@dezren39
dezren39 requested a review from a team as a code owner November 4, 2026 00:30
@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f3703ada-d34c-4e44-8858-d6fe634808e6
Commits

Reviewing files that changed from the base of the PR and between 65c7ff6 and 3de84df.

Files selected for processing: 3
  • nixos/home/laptop-backups-watchdog.sh
  • nixos/home/laptop-backups-watchdog.test.sh
  • nixos/home/laptop-backups.nix
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T00:32:30.535038Z 3de84df PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant